<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/11/11
 * Time: 17:23
 */

namespace app\api\model\Course;


use app\api\model\User\UserModel;
use think\Model;

class CourseCollage extends Model
{
    /**
     * @return \think\model\relation\HasOne
     * 用户
     */
    public function user()
    {
        return $this->hasOne(UserModel::class, 'id', 'user_id');
    }

    /**
     * @return \think\model\relation\HasOne
     * 课程
     */
    public function course()
    {
        return $this->hasOne(CourseModel::class, 'id', 'course_id');
    }
}